Learn R Programming

bfp (version 0.0-48)

Summary of BayesMfp object: Calculate and print the summary of a BayesMfp object

Description

Calculate and print the summary of a BayesMfp object, using S3 methods for the class.

Usage

# S3 method for BayesMfp
summary(object, level=0.95, table=TRUE,
                           shrinkage=NULL, ...)
# S3 method for summary.BayesMfp
print(x, ...)

Value

summary.BayesMfp returns a list with S3 class

summary.BayesMfp, where the arguments “call”,

“numVisited”, “termNames”,

“shiftScaleMax”, “inclusionProbs”, “chainlength”

(only for model sampling results) are copied from the attributes of the BayesMfp object, please see its help page for details.

The other elements are:

dataframe

the model overview as data.frame (only if table=TRUE was specified)

localInclusionProbs

local variable inclusion probability estimates

nModels

number of models contained in object

If there are multiple models in object, the list element

postProbs contains the exact (for exhaustively explored model spaces) or estimated (if model sampling has been done) posterior model probabilities.

If object contains only one FP model, then this one is summarized in more detail:

level

used credible level for coefficients HPD intervals

shrinkage

used shrinkage factor

summaryMat

matrix with posterior summaries of the single coefficients: “mode” gives the posterior mode, “HPDlower” and “HPDupper” give the boundaries of the HPD intervals with specified credible level

sigma2Sum

posterior summary for the regression variance: again mode, and lower and upper HPD bounds are given in a rowvector.

Arguments

object

a valid BayesMfp object

x

a return value of summary.BayesMfp

level

credible level for coefficients HPD intervals (default: 0.95)

table

should a data.frame of the models be included? (default)

shrinkage

shrinkage factor used, where NULL defaults to the posterior expected shrinkage factor

...

only used by summary.BayesMfp to pass arguments to as.data.frame.BayesMfp

Author

Daniel Saban\'es Bov\'e

See Also

summary.BmaSamples

Examples

Run this code
## generate a BayesMfp object
set.seed(19)

x1 <- rnorm(n=15)
x2 <- rbinom(n=15, size=20, prob=0.5) 
x3 <- rexp(n=15)

y <- rt(n=15, df=2)

test <- BayesMfp(y ~ bfp (x2, max = 4) + uc (x1 + x3), nModels = 100,
                 method="exhaustive")

## summary of multiple models:
summary(test)

## summary of just one model (no. 10):
summary(test[10])

## internal structure is usually not interesting:
str(summary(test[10]))

Run the code above in your browser using DataLab